<template>
  <div class="login-wrapper">
    <div class="p20">
      {{ loginFormState.name }}
      <el-input v-model="loginFormState.name" placeholder="请输入1" />
    </div>
    <div class="m20">
      {{ loginFormRef }}
      <el-input v-model="loginFormRef" placeholder="请输入2" />
    </div>
    <div class="m20">
      <div class="m10">
        <el-input v-model="demo" placeholder="请输入3" />
        <span>{{ demo }}</span>
      </div>
      <div class="m10">
        {{ lists }}
        <el-input v-model="lists[index]" v-for="(item, index) in lists" :key="index" placeholder="请输入4" />
      </div>
      <div class="m10">
        {{ listsObj }}
        <el-input v-model="item.a" v-for="(item, index) in listsObj" :key="index" placeholder="请输入5" />
      </div>
    </div>
  </div>
</template>

<script setup>
import { reactive, ref, computed } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { storeToRefs } from 'pinia'
const loginFormRef = ref('333')
const loginFormState = reactive({
  name: 'admin',
  pwd: '123456',
  loading: false
})
const lists = ref([1,2,3,4])
const listsObj = ref([{a: 1}, {a: 2}, {a: 3}, {a: 4}])

const useApp = useAppStore()
const { demo } = storeToRefs(useApp)
</script>

<style lang="scss" scoped>
.login-wrapper {
  coLor: #ff8800
}
</style>
